# $Id: PKGBUILD 86166 2013-03-12 14:43:58Z spupykin $
# Contributor: Derek 'tetonedge' Tucker <derek at tetonedge.net>

pkgname=ibamtray
pkgver=0.02
pkgrel=7
pkgdesc="system tray ibam frontend based off vubat with libnotify support"
arch=('any')
url="http://www.tetonedge.net/?page_id=223"
license=('GPL3')
depends=('ibam' 'python2' 'pygtk' 'pygobject' 'python2-notify' 'librsvg')
optdepends=('notification-daemon')
source=(http://www.tetonedge.net/code/ibamtray/$pkgname-$pkgver.tar.gz)
md5sums=('7e9195b410eb5912f23bd0a96da84022')

build() {
  cd $srcdir/$pkgname-$pkgver

  # python2 fix
  for file in $(find . -name '*.py' -print); do
    sed -i 's_#!.*/usr/bin/python_#!/usr/bin/python2_' $file
    sed -i 's_#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' $file
  done

  python2 setup.py build
}

package() {
  cd $srcdir/$pkgname-$pkgver
  python2 setup.py install --prefix=$pkgdir/usr
}
